{% extends base.html %}

{% block head %}
<style type="text/css">
    .doc-detail {
        background: #ccccff;
        border: solid 1px;
        padding: 2px;
    }
    .doc-type {
        color: red;
        background-color: #eee;
    }
</style>
{% end %}

{% block body %}

<div class="col-md-12 card">
    <div class="card-title">
        <span>模块详情</span>
        <div class="float-right">
            {% include common/button/back_button.html %}
        </div>
    </div>
</div>

<div class="card">

{% if doc_info is not None %}
    <h2>模块: {{doc_info.name}}</h2>

    <p>位于 <a href="/code/edit?path={{doc_info.file}}">{{doc_info.file}}</a></p>
    <pre class="doc-detail">{{doc_info.doc}}</pre>

    <h2>方法</h2>

    {% for func in doc_info.functions %}

    <div>
        <span>{{func.name}}</span>
        <span class="doc-type">{{func.type}}</span>
        <pre class="doc-detail">{{func.doc}}</pre>
    </div>

    {% end %}

{% end %}
</div>

{% end %}